package com.banksoft.front.util;

import com.google.gson.Gson;

import java.lang.reflect.Type;

/**
 * Created by Administrator on 2015/8/3.
 */
public class JSONHelper {
    private static final Gson gson = new Gson();

    public static String toJson(Object obj) {
        return gson.toJson(obj);
    }

    public static Object fromJson(String json , Class clazz) {
        return gson.fromJson(json, clazz);
    }

    public static Object fromJson(String json,Type type){
        return gson.fromJson(json,type);
    }

}
